﻿using System;

using System.Collections.Generic;
using System.Text;

namespace Silvermoon.Animations
{
    public class TranslateAnimation:Animation<TranslateTransform>
    {
        private TranslateTransform translate = new TranslateTransform();

        protected override TranslateTransform CalculateValue(float value)
        {
            float x = ((To.X - From.X) * value) + From.X;
            float y = ((To.Y - From.Y) * value) + From.Y;
            float z = ((To.Z - From.Z) * value) + From.Z;
            translate.X = x;
            translate.Y = y;
            translate.Z = z;
            return translate;
        }
    }
}
